package com.ddc.study.feature.login;

import com.ddc.study.base.BasePresenter;
import com.ddc.study.base.BaseView;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;

/**
 * Created on 2018/3/28.
 *
 * @author lshun
 * @version 1.0
 */
interface LoginContract {
    interface IModel {

    }

    interface IView extends BaseView {
        void showUsernameError(String errorMsg);

        void showPasswordError(String errorMsg);

        void loginSuccess(@NonNull int[] collections);

        void loginFailed(String errorMsg);

        void registerSuccess();

        void registerFailed(String errorMsg);
    }

    abstract class IPresenter extends BasePresenter<IView> {
        public abstract void login(@Nullable String username, @Nullable String password);

        public abstract void register(@Nullable String username, @Nullable String password,
                                      @Nullable String rePassword);
    }
}
